package conditions.complex

import conditions.BooleanNode

class NotNode extends BooleanNode {

   BooleanNode n
   
   public OrNode(BooleanNode n)
   {
      this.n = n
   }
   
   @Override
   public boolean evaluate()
   {
      println " NOT"
      return !n.evaluate()
   }
   
   /**
   * Necesario para implementar el clone
   */
   boolean equals(Object other)
   {
      other instanceof NotNode && this.n.equals(other.n)
   }
}